package zj.com.thead;


import static zj.com.model.HttpClientCrawler.getUrl;

public class Load implements Runnable{
    String s;
    Integer listNum;
    public String getS() {
        return s;
    }

    public void setS(String s) {
        this.s = s;
    }

    public Integer getListNum() {
        return listNum;
    }

    public void setListNum(Integer listNum) {
        this.listNum = listNum;
    }

    public Load(String s, Integer listNum) {
        this.s = s;
        this.listNum = listNum;
    }

    @Override
    public void run() {
        int page=0;
        while (page<((listNum/30)+1)) {
            try {
                getUrl(page,s);
                page=page+1;
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

}
